Skip to content

Refactor Select to handle grouped options in buildValueObj#2500

Merged
VedanshAgrawal22 merged 1 commit into
mainfrom
2499-fix-issue-with-initial-values-not-being-displayed-when-using-grouped-options-in-formik-select
Jun 18, 2025
Merged

Refactor Select to handle grouped options in buildValueObj#2500
VedanshAgrawal22 merged 1 commit into
mainfrom
2499-fix-issue-with-initial-values-not-being-displayed-when-using-grouped-options-in-formik-select

Conversation

@VedanshAgrawal22
Copy link
Copy Markdown
Contributor

@VedanshAgrawal22 VedanshAgrawal22 commented Jun 18, 2025

Description

This PR makes changes to handle the case when the options passed to the Select component are grouped.
The buildValueObj method has been modified to get the deeply nested options after checking for grouping.
This change fixes issues with initial values not being displayed in the dropdown when using formik.

Checklist

- [ ] I have made corresponding changes to the documentation.
- [ ] I have updated the types definition of modified exports.
- [ ] I have added tests that prove my fix is effective or that my feature works.
- [ ] I have added proper data-cy and data-testid attributes.

  • I have verified the functionality in some of the neeto web-apps.
  • I have added the necessary label (patch/minor/major - If package publish
    is required).

Reviewers

@VedanshAgrawal22
Copy link
Copy Markdown
Contributor Author

@farhanlatheef _a Please review.

@farhanlatheef
Copy link
Copy Markdown
Contributor

@josephmathew900 _a

Copy link
Copy Markdown
Contributor

@josephmathew900 josephmathew900 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@josephmathew900
Copy link
Copy Markdown
Contributor

@VedanshAgrawal22 _a Add a description and merge the PR.

@josephmathew900
Copy link
Copy Markdown
Contributor

@VedanshAgrawal22 Also please add a jest test for this.

@VedanshAgrawal22 VedanshAgrawal22 merged commit 13e5b40 into main Jun 18, 2025
1 check passed
@VedanshAgrawal22 VedanshAgrawal22 deleted the 2499-fix-issue-with-initial-values-not-being-displayed-when-using-grouped-options-in-formik-select branch June 18, 2025 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

patch Releases small requests or bug fixes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix issue with initial values not being displayed when using grouped options in formik Select

3 participants